package com.niuwa.p2p.action.customer;

import java.util.Map;

import org.apache.struts2.convention.annotation.Action;
import org.springframework.beans.factory.annotation.Autowired;

import com.niuwa.p2p.action.JsonAction;
import com.niuwa.p2p.core.mvc.entity.PageBean;
import com.niuwa.p2p.entity.customer.CustLoginLog;
import com.niuwa.p2p.entity.customer.CustPwdReset;
import com.niuwa.p2p.service.customer.ICustomerService;
import com.niuwa.p2p.vo.customer.BaseLoanVo;

public class BaseLoanAction extends JsonAction {
	
	/** 用户Servcie spring扫包注入 */
	@Autowired
	private ICustomerService customerService;
	
	@Action("gotoBorrowList")
	public String gotoBorrowList() {
		return "borrowList";
	}
	
	/**
	 * 借款列表
	 * 
	 * @return
	 * @throws Exception
	 */
	@Action(value = "borrowList")
	public String borrowList() throws Exception {
		// 获取查询参数
		Map<String, Object> paramMap = getParamMap();
		// 执行查询操作
		PageBean<BaseLoanVo> pagination = customerService.selectLoanList(paramMap);
		setObjectReSult(pagination);
		return NONE;
	}
	
	
	/**
	 * 
	 * 查询登录信息
	 * @return
	 * @throws Exception
	 */
	@Action(value = "searchLoginInfoList")
	public String searchLoginInfoLis() throws Exception {
		// 获取查询参数
		Map<String, Object> paramMap = getParamMap();
		// 执行查询操作
		PageBean<CustLoginLog> pagination = customerService.searchLoginInfoList(paramMap);
		setObjectReSult(pagination);
		return NONE;
	}
	
	
	/**
	 * 
	 * 查询密码重置列表
	 * @return
	 * @throws Exception
	 */
	@Action(value = "searchPasswordResetList")
	public String searchPasswordResetList() throws Exception {
		// 获取查询参数
		Map<String, Object> paramMap = getParamMap();
		// 执行查询操作
		PageBean<CustPwdReset> pagination = customerService.searchPasswordResetList(paramMap);
		setObjectReSult(pagination);
		return NONE;
	}
}
